Fix broken test for zombies.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Thu, 13 Oct 2005 14:25:42 +0000 (15:25 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Thu, 13 Oct 2005 14:25:42 +0000 (15:25 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendDomain.py

index 7b1ea4a75915d78ea3390ad383d40e91b91c90e1..66668ef6e97ca770cb079a83935f32dd65517b24 100644 (file)
@@ -313,12 +313,13 @@ class XendDomain:
     def domain_lookup_by_name_nr(self, name):
         self.domains_lock.acquire()
         try:
-            matching = filter(lambda d: d.getName() == name,
-                              self.domains.values())
+            matching = filter(
+                lambda d: d.getName() == name and not d.isShutdown(),
+                self.domains.values())
             n = len(matching)
             if n == 1:
                 return matching[0]
-            elif n > 1 and not d.isTerminated():
+            elif n > 1:
                 log.error('Name uniqueness has been violated for name %s!  '
                           'Recovering by renaming:', name)
                 for d in matching: